<style>
label{
	text-align:right;
	font-size:20px;
}
#row{
	margin-top:-5%;
}
#nama{font-size:15px;}
#no_telp{font-size:15px;}
#email{font-size:15px;}
#isi{font-size:15px;}
#media{font-size:15px;}
#ijin{font-size:15px;}
#no_uptsa{font-size:15px;}
</style>
<div class="row" id="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4>
					<center><span><h2>Form Pengaduan & Saran</h2></span></center>
				</h4>
			</div>
			<?php echo form_open($post_action);?>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-lg-3 control-label" for="input">Nama <font color="red">*</font></label>
					<div class="col-lg-6">
						<input type="text" class="form-control elastic" id="nama" name="nama">
					</div>
					<font color="red"><?php echo form_error("nama"); ?></font>
				</div>
				<br>
				<br>
				<div class="form-group">
					<label class="col-lg-3 control-label" for="input">No. Telepon <font color="red">*</font></label>
					<div class="col-lg-6">
						<input type="text" class="form-control elastic" id="no_telp" name="no_telp">
					</div>
					<font color="red"><?php echo form_error("no_telp"); ?></font>
				</div>
				<br>
				<br>
				<div class="form-group">
					<label class="col-lg-3 control-label" for="input">Email</label>
					<div class="col-lg-6">
						<input type="text" class="form-control elastic" id="email" name="email">						
					</div>
				</div>
				<br>
				<br>
				<div class="form-group">
					<label class="col-lg-3 control-label" for="input">Isi <font color="red">*</font></label>
					<div class="col-lg-6">
						<textarea class="form-control elastic" name="isi" id="isi" rows="5"></textarea>						
					</div>
					<font color="red"><?php echo form_error("isi"); ?></font>
				</div>
				<br>
				<br>
				<br>
				<br>
				<br>
				<br>
				<br>
				<div class="form-group">
					<label class="col-lg-3 control-label" for="input">Media <font color="red">*</font></label>
					<div class="col-lg-6">
						<select name="media" class="form-control nostyle">
							<option value="">--- Pilih Media ---</option>
							<option value="1">Datang Langsung</option>
						</select>						
					</div>
					<font color="red"><?php echo form_error("media"); ?></font>
				</div>
				<br>
				<nr>
				<div class="form-group">
					<label class="col-lg-3 control-label" for="radio">Terkait Ijin ? <font color="red">*</font></label>
					<div class="col-lg-6">
						<label class="radio-inline">
							<input name="terkait_ijin" type="radio" id="inlineCheckbox1" value="1" onClick="show()"> Ya
						</label>
						<label class="radio-inline">
							<input name="terkait_ijin" type="radio" id="inlineCheckbox1" value="2" onClick="hide()"> Tidak
						</label>
					</div>
				</div>
				<br>
				<div id="advanced_ijin">
					<div class="form-group">
						<label class="col-lg-3 control-label" for="select">Ijin</label>
						<div class="col-lg-6">
							<select class="nostyle form-control" id="ijin" name="ijin">
								<?php 
									echo '<option value="">--- Pilih Jenis Ijin ---</option>';
									foreach($dropdown_ijin as $row)
										{ 
											echo '<option value="'.$row["ID_IJIN"].'">'.$row["NAMA_IJIN"].'</option>';
										}
								?>
							</select>
						</div>
					</div>
					<br>
					<br>
					<br>
					<div class="form-group">
						<label class="col-lg-3 control-label" for="input">No. UPTSA</label>
						<div class="col-lg-6">
							<input class="form-control" id="no_uptsa" name="no_uptsa" type="text"/>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-offset-3 col-lg-9">
						<font color="red"><i>* harus diisi</i></font>
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-offset-3 col-lg-9">
						<button type="submit" class="btn btn-info">Simpan</button>&nbsp;&nbsp;
						<button type="reset" class="btn btn-warning">Reset</button>&nbsp;&nbsp;
						<button type="button" class="btn btn-default" onClick="kembali()">Kembali</button>
					</div>
				</div>
			</div>
			<?php echo form_close();?>
		</div>
	</div>
</div>
<script>
function show(){
	$("#advanced_ijin").show('slow');
}
function hide(){
	$("#advanced_ijin").hide('slow');
}
function kembali(){
	document.location = "<?php echo site_url("front_web");?>";
}
$(document).ready(function (){
	$("#advanced_ijin").hide();
	
	$("#no_telp").keydown(function (e) {
        if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
            (e.keyCode == 65 && e.ctrlKey === true) || 
            (e.keyCode >= 35 && e.keyCode <= 39)) {
                 return;
        }
        if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
            e.preventDefault();
        }
    });
});
</script>